import React from 'react'
import "./getNew.css"
import { Carousel, WingBlank } from 'antd-mobile';

export default function GetNew(props) {
    return (
        <WingBlank>
            <Carousel
                autoplay={true}
                infinite
            >
                <div className="getNew">
                    {
                        props.getNew.map(item => (
                            <div className="goods" key={item.id}>
                                <div>
                                    <img src={item.img} alt="" />
                                </div>
                                <div>
                                    <p>{item.goodsname}</p>
                                    <p className="old">原价:{item.market_price}</p>
                                    <p>现价: <span>{item.price}</span></p>
                                </div>
                            </div>
                        ))
                    }
                </div>
            </Carousel>
        </WingBlank>
    )
}
